package com.stylefeng.guns.common.persistence.model;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.stylefeng.guns.common.annotion.EmpCode;
import com.stylefeng.guns.common.annotion.Point;
import com.stylefeng.guns.common.annotion.PointType;
import com.stylefeng.guns.common.annotion.Year;
import com.stylefeng.guns.common.constant.PointConstType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 执业资格积分
 * </p>
 *
 * @author jondai
 * @since 2018-02-24
 */
@PointType(PointConstType.practicePoints)
@TableName("practice_points")
public class PracticePoints extends Model<PracticePoints> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
	@TableId(value="id", type= IdType.UUID)
	private String id;
	/**
	 * 年度
	 */
	@TableField("year")
	@Excel(name = "年度",width = 20)
	@Year
	private String year;
    /**
     * 员工编号
     */
	@EmpCode
	@TableField("emp_code")
	@Excel(name = "员工编号",width = 20)
	private String empCode;
    /**
     * 员工姓名
     */
	@TableField("emp_name")
	@Excel(name = "员工姓名",width = 20)
	private String empName;
    /**
     * 执业资格名称
     */
	@TableField("practice_name")
	@Excel(name = "执业资格名称",width = 25)
	private String practiceName;
    /**
     * 执业资格等级
     */
	@TableField("practice_level")
	@Excel(name = "执业资格等级",width = 20)
	private String practiceLevel;
    /**
     * 执业资格等级编码
     */
	@TableField("practice_level_code")
	private String practiceLevelCode;
    /**
     * 证书编号
     */
	@TableField("cer_number")
	@Excel(name = "证书编号",width = 20)
	private String cerNumber;
    /**
     * 发证机关
     */
	@TableField("issuing_organ")
	@Excel(name = "发证机关",width = 20)
	private String issuingOrgan;
    /**
     * 发证时间
     */
	@TableField("issuing_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@Excel(name = "发证时间", databaseFormat = "yyyy-MM-dd", format = "yyyy-MM-dd",width = 20)
	private Date issuingTime;

	@TableField(exist=false)
	private String strIssuingTime;
    /**
     * 取得方式
     */
	@TableField("get_way")
	@Excel(name = "取得方式")
	private String getWay;
    /**
     * 积分
     */
	@Point
	@Excel(name = "积分",width = 15)
	private Double integral;
	/**
	 * 创建日期
	 */
	@TableField("create_date")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date createDate;
	/**
	 * 数据来源
	 */
	@TableField("date_origin")
	private String dateOrigin;
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getEmpCode() {
		return empCode;
	}

	public void setEmpCode(String empCode) {
		this.empCode = empCode;
	}

	public String getEmpName() {
		return empName;
	}

	public void setEmpName(String empName) {
		this.empName = empName;
	}

	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public String getPracticeName() {
		return practiceName;
	}

	public void setPracticeName(String practiceName) {
		this.practiceName = practiceName;
	}

	public String getPracticeLevel() {
		return practiceLevel;
	}

	public void setPracticeLevel(String practiceLevel) {
		this.practiceLevel = practiceLevel;
	}

	public String getPracticeLevelCode() {
		return practiceLevelCode;
	}

	public void setPracticeLevelCode(String practiceLevelCode) {
		this.practiceLevelCode = practiceLevelCode;
	}

	public String getCerNumber() {
		return cerNumber;
	}

	public void setCerNumber(String cerNumber) {
		this.cerNumber = cerNumber;
	}

	public String getIssuingOrgan() {
		return issuingOrgan;
	}

	public void setIssuingOrgan(String issuingOrgan) {
		this.issuingOrgan = issuingOrgan;
	}

	public Date getIssuingTime() {
		return issuingTime;
	}

	public void setIssuingTime(Date issuingTime) {
		this.issuingTime = issuingTime;
	}

	public String getGetWay() {
		return getWay;
	}

	public void setGetWay(String getWay) {
		this.getWay = getWay;
	}

	public Double getIntegral() {
		return integral;
	}

	public void setIntegral(Double integral) {
		this.integral = integral;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getDateOrigin() {
		return dateOrigin;
	}

	public void setDateOrigin(String dateOrigin) {
		this.dateOrigin = dateOrigin;
	}

	public String getStrIssuingTime() {
		return strIssuingTime;
	}

	public void setStrIssuingTime(String strIssuingTime) {
		this.strIssuingTime = strIssuingTime;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "PracticePoints{" +
			"id=" + id +
			", empCode=" + empCode +
			", empName=" + empName +
			", year=" + year +
			", practiceName=" + practiceName +
			", practiceLevel=" + practiceLevel +
			", practiceLevelCode=" + practiceLevelCode +
			", cerNumber=" + cerNumber +
			", issuingOrgan=" + issuingOrgan +
			", issuingTime=" + issuingTime +
			", getWay=" + getWay +
			", integral=" + integral +
			"}";
	}
}
